package com.woshua.rcvspansize;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * Created by Android Studio.
 * User: 赵宏图
 * Date: 2019/8/12
 * Time: 8:59
 * Email:zhaohongtu@payworth.cn
 * Desc：图片适配器
 */
public class ImageAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public ImageAdapter(@Nullable List<String> data) {
        super(R.layout.layout_image_item,data);
    }

    @Override
    protected void convert(BaseViewHolder holder, String item) {
        Glide.with(mContext).load(item).fitCenter().into((ImageView) holder.getView(R.id.iv_rcv_item));
    }
}
